package wapper.drcorator.impl;

import wapper.componet.AbstractLogger;
import wapper.drcorator.AbstractLoggerDecorator;

import java.util.Date;

public class LineLoggerDecorator extends AbstractLoggerDecorator {
    public LineLoggerDecorator(AbstractLogger abstractLogger) {
        super(abstractLogger);
    }

    @Override
    protected void beforeWrapper() {
        getData().insert(0, "-----\n");
        getData().append( "\n-----");
    }

    @Override
    protected void endWrapper() {
        System.out.println(new Date());
    }

}
